package com.leadbank.example.client;

import com.leadbank.example.config.FeignConfig;
import com.leadbank.example.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Created by hp on 2019/7/3.
 */
@FeignClient(value = "microservice-simple-provider-user", fallback = UserFeignClientFallback.class
        , configuration = FeignConfig.class)
//@FeignClient(value = "microservice-simple-provider-user",fallbackFactory = UserFeignClientFallbackFactory.class)
public interface UserFeignClient {

    @GetMapping("/users/{id}")
    User findById(@PathVariable("id") Long id);
}
